Integrand size = 25, antiderivative size = 225 \[ \int (a+b \cos (c+d x))^3 \left (A+C \cos ^2(c+d x)\right ) \, dx=\frac {1}{8} a \left (4 a^2 (2 A+C)+3 b^2 (4 A+3 C)\right ) x-\frac {\left (3 a^4 C-4 b^4 (5 A+4 C)-4 a^2 b^2 (20 A+13 C)\right ) \sin (c+d x)}{30 b d}+\frac {a \left (100 A b^2-6 a^2 C+71 b^2 C\right ) \cos (c+d x) \sin (c+d x)}{120 d}-\frac {\left (3 a^2 C-4 b^2 (5 A+4 C)\right ) (a+b \cos (c+d x))^2 \sin (c+d x)}{60 b d}-\frac {a C (a+b \cos (c+d x))^3 \sin (c+d x)}{20 b d}+\frac {C (a+b \cos (c+d x))^4 \sin (c+d x)}{5 b d} \]
1/8*a*(4*a^2*(2*A+C)+3*b^2*(4*A+3*C))*x-1/30*(3*a^4*C-4*b^4*(5*A+4*C)-4*a^ 2*b^2*(20*A+13*C))*sin(d*x+c)/b/d+1/120*a*(100*A*b^2-6*C*a^2+71*C*b^2)*cos (d*x+c)*sin(d*x+c)/d-1/60*(3*a^2*C-4*b^2*(5*A+4*C))*(a+b*cos(d*x+c))^2*sin (d*x+c)/b/d-1/20*a*C*(a+b*cos(d*x+c))^3*sin(d*x+c)/b/d+1/5*C*(a+b*cos(d*x+ c))^4*sin(d*x+c)/b/d
Time = 1.73 (sec) , antiderivative size = 160, normalized size of antiderivative = 0.71 \[ \int (a+b \cos (c+d x))^3 \left (A+C \cos ^2(c+d x)\right ) \, dx=\frac {60 a \left (4 a^2 (2 A+C)+3 b^2 (4 A+3 C)\right ) (c+d x)+60 b \left (6 a^2 (4 A+3 C)+b^2 (6 A+5 C)\right ) \sin (c+d x)+120 a \left (3 A b^2+\left (a^2+3 b^2\right ) C\right ) \sin (2 (c+d x))+10 b \left (4 A b^2+12 a^2 C+5 b^2 C\right ) \sin (3 (c+d x))+45 a b^2 C \sin (4 (c+d x))+6 b^3 C \sin (5 (c+d x))}{480 d} \]
(60*a*(4*a^2*(2*A + C) + 3*b^2*(4*A + 3*C))*(c + d*x) + 60*b*(6*a^2*(4*A + 3*C) + b^2*(6*A + 5*C))*Sin[c + d*x] + 120*a*(3*A*b^2 + (a^2 + 3*b^2)*C)* Sin[2*(c + d*x)] + 10*b*(4*A*b^2 + 12*a^2*C + 5*b^2*C)*Sin[3*(c + d*x)] + 45*a*b^2*C*Sin[4*(c + d*x)] + 6*b^3*C*Sin[5*(c + d*x)])/(480*d)
Time = 0.78 (sec) , antiderivative size = 234, normalized size of antiderivative = 1.04, number of steps used = 8, number of rules used = 8, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.320, Rules used = {3042, 3503, 3042, 3232, 3042, 3232, 3042, 3213}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int (a+b \cos (c+d x))^3 \left (A+C \cos ^2(c+d x)\right ) \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \left (a+b \sin \left (c+d x+\frac {\pi }{2}\right )\right )^3 \left (A+C \sin \left (c+d x+\frac {\pi }{2}\right )^2\right )dx\) |
\(\Big \downarrow \) 3503 |
\(\displaystyle \frac {\int (a+b \cos (c+d x))^3 (b (5 A+4 C)-a C \cos (c+d x))dx}{5 b}+\frac {C \sin (c+d x) (a+b \cos (c+d x))^4}{5 b d}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\int \left (a+b \sin \left (c+d x+\frac {\pi }{2}\right )\right )^3 \left (b (5 A+4 C)-a C \sin \left (c+d x+\frac {\pi }{2}\right )\right )dx}{5 b}+\frac {C \sin (c+d x) (a+b \cos (c+d x))^4}{5 b d}\) |
\(\Big \downarrow \) 3232 |
\(\displaystyle \frac {\frac {1}{4} \int (a+b \cos (c+d x))^2 \left (a b (20 A+13 C)-\left (3 a^2 C-4 b^2 (5 A+4 C)\right ) \cos (c+d x)\right )dx-\frac {a C \sin (c+d x) (a+b \cos (c+d x))^3}{4 d}}{5 b}+\frac {C \sin (c+d x) (a+b \cos (c+d x))^4}{5 b d}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\frac {1}{4} \int \left (a+b \sin \left (c+d x+\frac {\pi }{2}\right )\right )^2 \left (a b (20 A+13 C)+\left (4 b^2 (5 A+4 C)-3 a^2 C\right ) \sin \left (c+d x+\frac {\pi }{2}\right )\right )dx-\frac {a C \sin (c+d x) (a+b \cos (c+d x))^3}{4 d}}{5 b}+\frac {C \sin (c+d x) (a+b \cos (c+d x))^4}{5 b d}\) |
\(\Big \downarrow \) 3232 |
\(\displaystyle \frac {\frac {1}{4} \left (\frac {1}{3} \int (a+b \cos (c+d x)) \left (b \left ((60 A+33 C) a^2+8 b^2 (5 A+4 C)\right )+a \left (-6 C a^2+100 A b^2+71 b^2 C\right ) \cos (c+d x)\right )dx-\frac {\left (3 a^2 C-4 b^2 (5 A+4 C)\right ) \sin (c+d x) (a+b \cos (c+d x))^2}{3 d}\right )-\frac {a C \sin (c+d x) (a+b \cos (c+d x))^3}{4 d}}{5 b}+\frac {C \sin (c+d x) (a+b \cos (c+d x))^4}{5 b d}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\frac {1}{4} \left (\frac {1}{3} \int \left (a+b \sin \left (c+d x+\frac {\pi }{2}\right )\right ) \left (b \left ((60 A+33 C) a^2+8 b^2 (5 A+4 C)\right )+a \left (-6 C a^2+100 A b^2+71 b^2 C\right ) \sin \left (c+d x+\frac {\pi }{2}\right )\right )dx-\frac {\left (3 a^2 C-4 b^2 (5 A+4 C)\right ) \sin (c+d x) (a+b \cos (c+d x))^2}{3 d}\right )-\frac {a C \sin (c+d x) (a+b \cos (c+d x))^3}{4 d}}{5 b}+\frac {C \sin (c+d x) (a+b \cos (c+d x))^4}{5 b d}\) |
\(\Big \downarrow \) 3213 |
\(\displaystyle \frac {\frac {1}{4} \left (\frac {1}{3} \left (\frac {a b \left (-6 a^2 C+100 A b^2+71 b^2 C\right ) \sin (c+d x) \cos (c+d x)}{2 d}+\frac {15}{2} a b x \left (4 a^2 (2 A+C)+3 b^2 (4 A+3 C)\right )-\frac {2 \left (3 a^4 C-4 a^2 b^2 (20 A+13 C)-4 b^4 (5 A+4 C)\right ) \sin (c+d x)}{d}\right )-\frac {\left (3 a^2 C-4 b^2 (5 A+4 C)\right ) \sin (c+d x) (a+b \cos (c+d x))^2}{3 d}\right )-\frac {a C \sin (c+d x) (a+b \cos (c+d x))^3}{4 d}}{5 b}+\frac {C \sin (c+d x) (a+b \cos (c+d x))^4}{5 b d}\) |
(C*(a + b*Cos[c + d*x])^4*Sin[c + d*x])/(5*b*d) + (-1/4*(a*C*(a + b*Cos[c + d*x])^3*Sin[c + d*x])/d + (-1/3*((3*a^2*C - 4*b^2*(5*A + 4*C))*(a + b*Co s[c + d*x])^2*Sin[c + d*x])/d + ((15*a*b*(4*a^2*(2*A + C) + 3*b^2*(4*A + 3 *C))*x)/2 - (2*(3*a^4*C - 4*b^4*(5*A + 4*C) - 4*a^2*b^2*(20*A + 13*C))*Sin [c + d*x])/d + (a*b*(100*A*b^2 - 6*a^2*C + 71*b^2*C)*Cos[c + d*x]*Sin[c + d*x])/(2*d))/3)/4)/(5*b)
3.6.41.3.1 Defintions of rubi rules used
Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])*((c_.) + (d_.)*sin[(e_.) + (f_.) *(x_)]), x_Symbol] :> Simp[(2*a*c + b*d)*(x/2), x] + (-Simp[(b*c + a*d)*(Co s[e + f*x]/f), x] - Simp[b*d*Cos[e + f*x]*(Sin[e + f*x]/(2*f)), x]) /; Free Q[{a, b, c, d, e, f}, x] && NeQ[b*c - a*d, 0]
Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)]), x_Symbol] :> Simp[(-d)*Cos[e + f*x]*((a + b*Sin[e + f*x])^m/( f*(m + 1))), x] + Simp[1/(m + 1) Int[(a + b*Sin[e + f*x])^(m - 1)*Simp[b* d*m + a*c*(m + 1) + (a*d*m + b*c*(m + 1))*Sin[e + f*x], x], x], x] /; FreeQ [{a, b, c, d, e, f}, x] && NeQ[b*c - a*d, 0] && NeQ[a^2 - b^2, 0] && GtQ[m, 0] && IntegerQ[2*m]
Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*((A_.) + (C_.)*sin[(e_.) + (f_.)*(x_)]^2), x_Symbol] :> Simp[(-C)*Cos[e + f*x]*((a + b*Sin[e + f*x])^ (m + 1)/(b*f*(m + 2))), x] + Simp[1/(b*(m + 2)) Int[(a + b*Sin[e + f*x])^ m*Simp[A*b*(m + 2) + b*C*(m + 1) - a*C*Sin[e + f*x], x], x], x] /; FreeQ[{a , b, e, f, A, C, m}, x] && !LtQ[m, -1]
Time = 6.08 (sec) , antiderivative size = 146, normalized size of antiderivative = 0.65
method | result | size |
parallelrisch | \(\frac {360 \left (b^{2} \left (A +C \right )+\frac {a^{2} C}{3}\right ) a \sin \left (2 d x +2 c \right )+40 b \left (\left (A +\frac {5 C}{4}\right ) b^{2}+3 a^{2} C \right ) \sin \left (3 d x +3 c \right )+45 C a \,b^{2} \sin \left (4 d x +4 c \right )+6 C \,b^{3} \sin \left (5 d x +5 c \right )+1440 \left (\frac {\left (A +\frac {5 C}{6}\right ) b^{2}}{4}+a^{2} \left (A +\frac {3 C}{4}\right )\right ) b \sin \left (d x +c \right )+480 x \left (\frac {3 \left (A +\frac {3 C}{4}\right ) b^{2}}{2}+a^{2} \left (A +\frac {C}{2}\right )\right ) d a}{480 d}\) | \(146\) |
parts | \(a^{3} A x +\frac {\left (A \,b^{3}+3 C \,a^{2} b \right ) \left (2+\cos ^{2}\left (d x +c \right )\right ) \sin \left (d x +c \right )}{3 d}+\frac {\left (3 A a \,b^{2}+C \,a^{3}\right ) \left (\frac {\cos \left (d x +c \right ) \sin \left (d x +c \right )}{2}+\frac {d x}{2}+\frac {c}{2}\right )}{d}+\frac {C \,b^{3} \left (\frac {8}{3}+\cos ^{4}\left (d x +c \right )+\frac {4 \left (\cos ^{2}\left (d x +c \right )\right )}{3}\right ) \sin \left (d x +c \right )}{5 d}+\frac {3 \sin \left (d x +c \right ) A \,a^{2} b}{d}+\frac {3 C a \,b^{2} \left (\frac {\left (\cos ^{3}\left (d x +c \right )+\frac {3 \cos \left (d x +c \right )}{2}\right ) \sin \left (d x +c \right )}{4}+\frac {3 d x}{8}+\frac {3 c}{8}\right )}{d}\) | \(175\) |
derivativedivides | \(\frac {\frac {C \,b^{3} \left (\frac {8}{3}+\cos ^{4}\left (d x +c \right )+\frac {4 \left (\cos ^{2}\left (d x +c \right )\right )}{3}\right ) \sin \left (d x +c \right )}{5}+3 C a \,b^{2} \left (\frac {\left (\cos ^{3}\left (d x +c \right )+\frac {3 \cos \left (d x +c \right )}{2}\right ) \sin \left (d x +c \right )}{4}+\frac {3 d x}{8}+\frac {3 c}{8}\right )+\frac {A \,b^{3} \left (2+\cos ^{2}\left (d x +c \right )\right ) \sin \left (d x +c \right )}{3}+C \,a^{2} b \left (2+\cos ^{2}\left (d x +c \right )\right ) \sin \left (d x +c \right )+3 A a \,b^{2} \left (\frac {\cos \left (d x +c \right ) \sin \left (d x +c \right )}{2}+\frac {d x}{2}+\frac {c}{2}\right )+C \,a^{3} \left (\frac {\cos \left (d x +c \right ) \sin \left (d x +c \right )}{2}+\frac {d x}{2}+\frac {c}{2}\right )+3 A \sin \left (d x +c \right ) a^{2} b +A \,a^{3} \left (d x +c \right )}{d}\) | \(201\) |
default | \(\frac {\frac {C \,b^{3} \left (\frac {8}{3}+\cos ^{4}\left (d x +c \right )+\frac {4 \left (\cos ^{2}\left (d x +c \right )\right )}{3}\right ) \sin \left (d x +c \right )}{5}+3 C a \,b^{2} \left (\frac {\left (\cos ^{3}\left (d x +c \right )+\frac {3 \cos \left (d x +c \right )}{2}\right ) \sin \left (d x +c \right )}{4}+\frac {3 d x}{8}+\frac {3 c}{8}\right )+\frac {A \,b^{3} \left (2+\cos ^{2}\left (d x +c \right )\right ) \sin \left (d x +c \right )}{3}+C \,a^{2} b \left (2+\cos ^{2}\left (d x +c \right )\right ) \sin \left (d x +c \right )+3 A a \,b^{2} \left (\frac {\cos \left (d x +c \right ) \sin \left (d x +c \right )}{2}+\frac {d x}{2}+\frac {c}{2}\right )+C \,a^{3} \left (\frac {\cos \left (d x +c \right ) \sin \left (d x +c \right )}{2}+\frac {d x}{2}+\frac {c}{2}\right )+3 A \sin \left (d x +c \right ) a^{2} b +A \,a^{3} \left (d x +c \right )}{d}\) | \(201\) |
risch | \(a^{3} A x +\frac {3 A a \,b^{2} x}{2}+\frac {a^{3} C x}{2}+\frac {9 a \,b^{2} C x}{8}+\frac {3 \sin \left (d x +c \right ) A \,a^{2} b}{d}+\frac {3 \sin \left (d x +c \right ) A \,b^{3}}{4 d}+\frac {9 \sin \left (d x +c \right ) C \,a^{2} b}{4 d}+\frac {5 \sin \left (d x +c \right ) C \,b^{3}}{8 d}+\frac {C \,b^{3} \sin \left (5 d x +5 c \right )}{80 d}+\frac {3 C a \,b^{2} \sin \left (4 d x +4 c \right )}{32 d}+\frac {\sin \left (3 d x +3 c \right ) A \,b^{3}}{12 d}+\frac {\sin \left (3 d x +3 c \right ) C \,a^{2} b}{4 d}+\frac {5 \sin \left (3 d x +3 c \right ) C \,b^{3}}{48 d}+\frac {3 \sin \left (2 d x +2 c \right ) A a \,b^{2}}{4 d}+\frac {\sin \left (2 d x +2 c \right ) C \,a^{3}}{4 d}+\frac {3 \sin \left (2 d x +2 c \right ) C a \,b^{2}}{4 d}\) | \(241\) |
norman | \(\frac {\left (A \,a^{3}+\frac {3}{2} A a \,b^{2}+\frac {1}{2} C \,a^{3}+\frac {9}{8} C a \,b^{2}\right ) x +\left (A \,a^{3}+\frac {3}{2} A a \,b^{2}+\frac {1}{2} C \,a^{3}+\frac {9}{8} C a \,b^{2}\right ) x \left (\tan ^{10}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+\left (5 A \,a^{3}+\frac {15}{2} A a \,b^{2}+\frac {5}{2} C \,a^{3}+\frac {45}{8} C a \,b^{2}\right ) x \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+\left (5 A \,a^{3}+\frac {15}{2} A a \,b^{2}+\frac {5}{2} C \,a^{3}+\frac {45}{8} C a \,b^{2}\right ) x \left (\tan ^{8}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+\left (10 A \,a^{3}+15 A a \,b^{2}+5 C \,a^{3}+\frac {45}{4} C a \,b^{2}\right ) x \left (\tan ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+\left (10 A \,a^{3}+15 A a \,b^{2}+5 C \,a^{3}+\frac {45}{4} C a \,b^{2}\right ) x \left (\tan ^{6}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+\frac {\left (24 A \,a^{2} b -12 A a \,b^{2}+8 A \,b^{3}-4 C \,a^{3}+24 C \,a^{2} b -15 C a \,b^{2}+8 C \,b^{3}\right ) \left (\tan ^{9}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{4 d}+\frac {\left (24 A \,a^{2} b +12 A a \,b^{2}+8 A \,b^{3}+4 C \,a^{3}+24 C \,a^{2} b +15 C a \,b^{2}+8 C \,b^{3}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{4 d}+\frac {\left (144 A \,a^{2} b -36 A a \,b^{2}+32 A \,b^{3}-12 C \,a^{3}+96 C \,a^{2} b -9 C a \,b^{2}+16 C \,b^{3}\right ) \left (\tan ^{7}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{6 d}+\frac {\left (144 A \,a^{2} b +36 A a \,b^{2}+32 A \,b^{3}+12 C \,a^{3}+96 C \,a^{2} b +9 C a \,b^{2}+16 C \,b^{3}\right ) \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{6 d}+\frac {4 b \left (135 A \,a^{2}+25 A \,b^{2}+75 a^{2} C +29 b^{2} C \right ) \left (\tan ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{15 d}}{\left (1+\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{5}}\) | \(537\) |
1/480*(360*(b^2*(A+C)+1/3*a^2*C)*a*sin(2*d*x+2*c)+40*b*((A+5/4*C)*b^2+3*a^ 2*C)*sin(3*d*x+3*c)+45*C*a*b^2*sin(4*d*x+4*c)+6*C*b^3*sin(5*d*x+5*c)+1440* (1/4*(A+5/6*C)*b^2+a^2*(A+3/4*C))*b*sin(d*x+c)+480*x*(3/2*(A+3/4*C)*b^2+a^ 2*(A+1/2*C))*d*a)/d
Time = 0.28 (sec) , antiderivative size = 153, normalized size of antiderivative = 0.68 \[ \int (a+b \cos (c+d x))^3 \left (A+C \cos ^2(c+d x)\right ) \, dx=\frac {15 \, {\left (4 \, {\left (2 \, A + C\right )} a^{3} + 3 \, {\left (4 \, A + 3 \, C\right )} a b^{2}\right )} d x + {\left (24 \, C b^{3} \cos \left (d x + c\right )^{4} + 90 \, C a b^{2} \cos \left (d x + c\right )^{3} + 120 \, {\left (3 \, A + 2 \, C\right )} a^{2} b + 16 \, {\left (5 \, A + 4 \, C\right )} b^{3} + 8 \, {\left (15 \, C a^{2} b + {\left (5 \, A + 4 \, C\right )} b^{3}\right )} \cos \left (d x + c\right )^{2} + 15 \, {\left (4 \, C a^{3} + 3 \, {\left (4 \, A + 3 \, C\right )} a b^{2}\right )} \cos \left (d x + c\right )\right )} \sin \left (d x + c\right )}{120 \, d} \]
1/120*(15*(4*(2*A + C)*a^3 + 3*(4*A + 3*C)*a*b^2)*d*x + (24*C*b^3*cos(d*x + c)^4 + 90*C*a*b^2*cos(d*x + c)^3 + 120*(3*A + 2*C)*a^2*b + 16*(5*A + 4*C )*b^3 + 8*(15*C*a^2*b + (5*A + 4*C)*b^3)*cos(d*x + c)^2 + 15*(4*C*a^3 + 3* (4*A + 3*C)*a*b^2)*cos(d*x + c))*sin(d*x + c))/d
Leaf count of result is larger than twice the leaf count of optimal. 440 vs. \(2 (206) = 412\).
Time = 0.28 (sec) , antiderivative size = 440, normalized size of antiderivative = 1.96 \[ \int (a+b \cos (c+d x))^3 \left (A+C \cos ^2(c+d x)\right ) \, dx=\begin {cases} A a^{3} x + \frac {3 A a^{2} b \sin {\left (c + d x \right )}}{d} + \frac {3 A a b^{2} x \sin ^{2}{\left (c + d x \right )}}{2} + \frac {3 A a b^{2} x \cos ^{2}{\left (c + d x \right )}}{2} + \frac {3 A a b^{2} \sin {\left (c + d x \right )} \cos {\left (c + d x \right )}}{2 d} + \frac {2 A b^{3} \sin ^{3}{\left (c + d x \right )}}{3 d} + \frac {A b^{3} \sin {\left (c + d x \right )} \cos ^{2}{\left (c + d x \right )}}{d} + \frac {C a^{3} x \sin ^{2}{\left (c + d x \right )}}{2} + \frac {C a^{3} x \cos ^{2}{\left (c + d x \right )}}{2} + \frac {C a^{3} \sin {\left (c + d x \right )} \cos {\left (c + d x \right )}}{2 d} + \frac {2 C a^{2} b \sin ^{3}{\left (c + d x \right )}}{d} + \frac {3 C a^{2} b \sin {\left (c + d x \right )} \cos ^{2}{\left (c + d x \right )}}{d} + \frac {9 C a b^{2} x \sin ^{4}{\left (c + d x \right )}}{8} + \frac {9 C a b^{2} x \sin ^{2}{\left (c + d x \right )} \cos ^{2}{\left (c + d x \right )}}{4} + \frac {9 C a b^{2} x \cos ^{4}{\left (c + d x \right )}}{8} + \frac {9 C a b^{2} \sin ^{3}{\left (c + d x \right )} \cos {\left (c + d x \right )}}{8 d} + \frac {15 C a b^{2} \sin {\left (c + d x \right )} \cos ^{3}{\left (c + d x \right )}}{8 d} + \frac {8 C b^{3} \sin ^{5}{\left (c + d x \right )}}{15 d} + \frac {4 C b^{3} \sin ^{3}{\left (c + d x \right )} \cos ^{2}{\left (c + d x \right )}}{3 d} + \frac {C b^{3} \sin {\left (c + d x \right )} \cos ^{4}{\left (c + d x \right )}}{d} & \text {for}\: d \neq 0 \\x \left (A + C \cos ^{2}{\left (c \right )}\right ) \left (a + b \cos {\left (c \right )}\right )^{3} & \text {otherwise} \end {cases} \]
Piecewise((A*a**3*x + 3*A*a**2*b*sin(c + d*x)/d + 3*A*a*b**2*x*sin(c + d*x )**2/2 + 3*A*a*b**2*x*cos(c + d*x)**2/2 + 3*A*a*b**2*sin(c + d*x)*cos(c + d*x)/(2*d) + 2*A*b**3*sin(c + d*x)**3/(3*d) + A*b**3*sin(c + d*x)*cos(c + d*x)**2/d + C*a**3*x*sin(c + d*x)**2/2 + C*a**3*x*cos(c + d*x)**2/2 + C*a* *3*sin(c + d*x)*cos(c + d*x)/(2*d) + 2*C*a**2*b*sin(c + d*x)**3/d + 3*C*a* *2*b*sin(c + d*x)*cos(c + d*x)**2/d + 9*C*a*b**2*x*sin(c + d*x)**4/8 + 9*C *a*b**2*x*sin(c + d*x)**2*cos(c + d*x)**2/4 + 9*C*a*b**2*x*cos(c + d*x)**4 /8 + 9*C*a*b**2*sin(c + d*x)**3*cos(c + d*x)/(8*d) + 15*C*a*b**2*sin(c + d *x)*cos(c + d*x)**3/(8*d) + 8*C*b**3*sin(c + d*x)**5/(15*d) + 4*C*b**3*sin (c + d*x)**3*cos(c + d*x)**2/(3*d) + C*b**3*sin(c + d*x)*cos(c + d*x)**4/d , Ne(d, 0)), (x*(A + C*cos(c)**2)*(a + b*cos(c))**3, True))
Time = 0.21 (sec) , antiderivative size = 194, normalized size of antiderivative = 0.86 \[ \int (a+b \cos (c+d x))^3 \left (A+C \cos ^2(c+d x)\right ) \, dx=\frac {480 \, {\left (d x + c\right )} A a^{3} + 120 \, {\left (2 \, d x + 2 \, c + \sin \left (2 \, d x + 2 \, c\right )\right )} C a^{3} - 480 \, {\left (\sin \left (d x + c\right )^{3} - 3 \, \sin \left (d x + c\right )\right )} C a^{2} b + 360 \, {\left (2 \, d x + 2 \, c + \sin \left (2 \, d x + 2 \, c\right )\right )} A a b^{2} + 45 \, {\left (12 \, d x + 12 \, c + \sin \left (4 \, d x + 4 \, c\right ) + 8 \, \sin \left (2 \, d x + 2 \, c\right )\right )} C a b^{2} - 160 \, {\left (\sin \left (d x + c\right )^{3} - 3 \, \sin \left (d x + c\right )\right )} A b^{3} + 32 \, {\left (3 \, \sin \left (d x + c\right )^{5} - 10 \, \sin \left (d x + c\right )^{3} + 15 \, \sin \left (d x + c\right )\right )} C b^{3} + 1440 \, A a^{2} b \sin \left (d x + c\right )}{480 \, d} \]
1/480*(480*(d*x + c)*A*a^3 + 120*(2*d*x + 2*c + sin(2*d*x + 2*c))*C*a^3 - 480*(sin(d*x + c)^3 - 3*sin(d*x + c))*C*a^2*b + 360*(2*d*x + 2*c + sin(2*d *x + 2*c))*A*a*b^2 + 45*(12*d*x + 12*c + sin(4*d*x + 4*c) + 8*sin(2*d*x + 2*c))*C*a*b^2 - 160*(sin(d*x + c)^3 - 3*sin(d*x + c))*A*b^3 + 32*(3*sin(d* x + c)^5 - 10*sin(d*x + c)^3 + 15*sin(d*x + c))*C*b^3 + 1440*A*a^2*b*sin(d *x + c))/d
Time = 0.34 (sec) , antiderivative size = 174, normalized size of antiderivative = 0.77 \[ \int (a+b \cos (c+d x))^3 \left (A+C \cos ^2(c+d x)\right ) \, dx=\frac {C b^{3} \sin \left (5 \, d x + 5 \, c\right )}{80 \, d} + \frac {3 \, C a b^{2} \sin \left (4 \, d x + 4 \, c\right )}{32 \, d} + \frac {1}{8} \, {\left (8 \, A a^{3} + 4 \, C a^{3} + 12 \, A a b^{2} + 9 \, C a b^{2}\right )} x + \frac {{\left (12 \, C a^{2} b + 4 \, A b^{3} + 5 \, C b^{3}\right )} \sin \left (3 \, d x + 3 \, c\right )}{48 \, d} + \frac {{\left (C a^{3} + 3 \, A a b^{2} + 3 \, C a b^{2}\right )} \sin \left (2 \, d x + 2 \, c\right )}{4 \, d} + \frac {{\left (24 \, A a^{2} b + 18 \, C a^{2} b + 6 \, A b^{3} + 5 \, C b^{3}\right )} \sin \left (d x + c\right )}{8 \, d} \]
1/80*C*b^3*sin(5*d*x + 5*c)/d + 3/32*C*a*b^2*sin(4*d*x + 4*c)/d + 1/8*(8*A *a^3 + 4*C*a^3 + 12*A*a*b^2 + 9*C*a*b^2)*x + 1/48*(12*C*a^2*b + 4*A*b^3 + 5*C*b^3)*sin(3*d*x + 3*c)/d + 1/4*(C*a^3 + 3*A*a*b^2 + 3*C*a*b^2)*sin(2*d* x + 2*c)/d + 1/8*(24*A*a^2*b + 18*C*a^2*b + 6*A*b^3 + 5*C*b^3)*sin(d*x + c )/d
Time = 3.90 (sec) , antiderivative size = 488, normalized size of antiderivative = 2.17 \[ \int (a+b \cos (c+d x))^3 \left (A+C \cos ^2(c+d x)\right ) \, dx=\frac {\left (2\,A\,b^3-C\,a^3+2\,C\,b^3-3\,A\,a\,b^2+6\,A\,a^2\,b-\frac {15\,C\,a\,b^2}{4}+6\,C\,a^2\,b\right )\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^9+\left (\frac {16\,A\,b^3}{3}-2\,C\,a^3+\frac {8\,C\,b^3}{3}-6\,A\,a\,b^2+24\,A\,a^2\,b-\frac {3\,C\,a\,b^2}{2}+16\,C\,a^2\,b\right )\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^7+\left (\frac {20\,A\,b^3}{3}+\frac {116\,C\,b^3}{15}+36\,A\,a^2\,b+20\,C\,a^2\,b\right )\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5+\left (\frac {16\,A\,b^3}{3}+2\,C\,a^3+\frac {8\,C\,b^3}{3}+6\,A\,a\,b^2+24\,A\,a^2\,b+\frac {3\,C\,a\,b^2}{2}+16\,C\,a^2\,b\right )\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3+\left (2\,A\,b^3+C\,a^3+2\,C\,b^3+3\,A\,a\,b^2+6\,A\,a^2\,b+\frac {15\,C\,a\,b^2}{4}+6\,C\,a^2\,b\right )\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{d\,\left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{10}+5\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^8+10\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6+10\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4+5\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+1\right )}-\frac {a\,\left (\mathrm {atan}\left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )-\frac {d\,x}{2}\right )\,\left (8\,A\,a^2+12\,A\,b^2+4\,C\,a^2+9\,C\,b^2\right )}{4\,d}+\frac {a\,\mathrm {atan}\left (\frac {a\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\,\left (8\,A\,a^2+12\,A\,b^2+4\,C\,a^2+9\,C\,b^2\right )}{4\,\left (2\,A\,a^3+C\,a^3+3\,A\,a\,b^2+\frac {9\,C\,a\,b^2}{4}\right )}\right )\,\left (8\,A\,a^2+12\,A\,b^2+4\,C\,a^2+9\,C\,b^2\right )}{4\,d} \]
(tan(c/2 + (d*x)/2)^9*(2*A*b^3 - C*a^3 + 2*C*b^3 - 3*A*a*b^2 + 6*A*a^2*b - (15*C*a*b^2)/4 + 6*C*a^2*b) + tan(c/2 + (d*x)/2)^3*((16*A*b^3)/3 + 2*C*a^ 3 + (8*C*b^3)/3 + 6*A*a*b^2 + 24*A*a^2*b + (3*C*a*b^2)/2 + 16*C*a^2*b) + t an(c/2 + (d*x)/2)^7*((16*A*b^3)/3 - 2*C*a^3 + (8*C*b^3)/3 - 6*A*a*b^2 + 24 *A*a^2*b - (3*C*a*b^2)/2 + 16*C*a^2*b) + tan(c/2 + (d*x)/2)^5*((20*A*b^3)/ 3 + (116*C*b^3)/15 + 36*A*a^2*b + 20*C*a^2*b) + tan(c/2 + (d*x)/2)*(2*A*b^ 3 + C*a^3 + 2*C*b^3 + 3*A*a*b^2 + 6*A*a^2*b + (15*C*a*b^2)/4 + 6*C*a^2*b)) /(d*(5*tan(c/2 + (d*x)/2)^2 + 10*tan(c/2 + (d*x)/2)^4 + 10*tan(c/2 + (d*x) /2)^6 + 5*tan(c/2 + (d*x)/2)^8 + tan(c/2 + (d*x)/2)^10 + 1)) - (a*(atan(ta n(c/2 + (d*x)/2)) - (d*x)/2)*(8*A*a^2 + 12*A*b^2 + 4*C*a^2 + 9*C*b^2))/(4* d) + (a*atan((a*tan(c/2 + (d*x)/2)*(8*A*a^2 + 12*A*b^2 + 4*C*a^2 + 9*C*b^2 ))/(4*(2*A*a^3 + C*a^3 + 3*A*a*b^2 + (9*C*a*b^2)/4)))*(8*A*a^2 + 12*A*b^2 + 4*C*a^2 + 9*C*b^2))/(4*d)